<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="br.com.Modelo.UsuarioCliente"%>
<%@page import="java.util.List"%>
<%@page import="br.com.Modelo.Produto"%>
<%@page import="br.com.Modelo.UsuarioComerciante"%>
<%@page import="br.com.Modelo.Pagina"%>
<%@page import="br.com.Modelo.Endereco"%>
<%@page import="br.com.Dao.UsuarioClienteDao"%>
<%@page import="br.com.Dao.UsuarioComercianteDao"%>
<%@page import="br.com.Dao.ProdutoDao"%>
<%@page import="br.com.Dao.PaginaDao"%>
<%@page import="br.com.Dao.EnderecoDao"%>
<%@page import="java.io.IOException"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Painel Administrativo</title>

<!-- Bootstrap Core CSS -->
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../bootstrap/bootstrapValidator.css" rel="stylesheet">



<!-- Custom CSS -->
<link href="../public/css/sb-admin.css" rel="stylesheet">

<!-- Morris Charts CSS -->
<link href="../public/css/plugins/morris.css" rel="stylesheet">

<!-- Custom Fonts -->
<link href="../public/font-awesome-4.1.0/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">

<script type="text/javascript" src="../public/js/jquery.js"></script>

<script type="text/javascript" src="../bootstrap/js/bootstrapValidator.js"></script>


<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


<style>
.btn-primary {
	color: #ffffff;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
	background-color: #229ac8;
	background-image: linear-gradient(to bottom, #23a1d1, #1f90bb);
	background-repeat: repeat-x;
	border-color: #1f90bb #1f90bb #145e7a;
}

.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]
	{
	background-color: #1f90bb;
	background-position: 0 -15px;
}

#capa {
  filter: gray; /* IE6-9 */
  -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */
    -webkit-box-shadow: 0px 1px 3px 2px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px 1px 3px 2px rgba(0,0,0,0.75);
    box-shadow: 0px 1px 3px 2px rgba(0,0,0,0.75);
    margin-bottom:10px;
}


</style>

<script>
	$(document)
			.ready(
					function() {
						var i = 1;

						$("#add_row")
								.click(
										function() {
											if (i != 3) {
												$('#addr' + i)
														.html(
																"<td>"
																		+ (i + 1)
																		+ "</td><td><input name='name"+i+"' type='text' placeholder='Name' class='form-control input-md'  /> </td> ");

												$('#tab_logic').append(
														'<tr id="addr'
																+ (i + 1)
																+ '"></tr>');
												i++;

											}

										});

						$("#delete_row").click(function() {
							if (i > 1) {
								$("#addr" + (i - 1)).html('');
								i--;
							}
						});

					});

	function carregaDadosEndJSon(id_cliente) {

		var jsonData = JSON.stringify(jsonDataObject);

		$.getJSON("responce.jsp", {
			action : "export",
			json : jsonData
		}, function(data) {
			alert(data.message);
			$('#return_message').html(data.message);
		});

	}

	/* $(document).ready(function(){
	 	  $("#EditEnd").on('show.bs.modal',function(event){
	 		  var button = $(event.relatedTarget);
	 		  var recipient = button.data('whatever');

	 		  alert("HTML: " +recipient);

	 		  $.get('/plataforma_marketing/admin/responce.jsp',{id:recipient},function(data) {   

		        $('#nome').val(data.cep);
		      alert("HTML: " +data.cep);             
	          
	        });
	 		  
	 	  });
	 	  
	 	  $("#btn2").click(function(){
	 	    alert("HTML: " + $("#test").html());
	 	  });

	 		  
	 	});*/

	function carregaDadosClienteJSon(id_cliente) {
		$.post('responce.jsp', {
			id_cliente : id_cliente
		}, function(data) {
			$('#nome').val(data.nome);
			$('#email').val(data.email);
			$('#id_cliente').val(data.id_cliente);
		}, 'json');
	}

	function janelaEditarCliente(id_cliente) {

		//antes de abrir a janela, preciso carregar os dados do cliente e preencher os campos dentro do modal
		carregaDadosClienteJSon(id_cliente);

		$('#modalEditarCliente').modal('show');
	}

	$(document).ready(function() {
		$('#submit').click(function(event) {
			var username = $('#user').val();
			alert("" + username);
			$.get('jsonServelt', {
				user : username
			}, function(responseText) {
				$('#welcometext').text(responseText);
			});
		});
	});

	$(document).ready(function() {
		//$('#p').click(function() {
			$("#EditEnd").on('show.bs.modal', function(event) {
				var button = $(event.relatedTarget);
				var recipient = button.data('whatever');
				//alert("sdsd"+recipient);

				$.ajax({
					url : 'jsonServelt',
					type : 'post',
					dataType : 'json',
					data : {
						campo1 : recipient
					},
					success : function(data) {
						$('#cep').val(data.cep);
						$('#cidade').val(data.cidade);
						$('#bairro').val(data.bairro);
						$('#numero').val(data.numero);
						$('#rua').val(data.rua);
						$('#id_pagina').val(data.id_pagina);
						$('#count').val(data.count);
						$('#telefone').val(data.telefone);
						$('#id_end').val(data.id);
					}
				});
			});
		//});
	});



	 $(document).ready(function() {
			//$('#p').click(function() {
				$("#delete").on('show.bs.modal', function(event) {
					var button = $(event.relatedTarget);
					var recipient = button.data('whatever');
					
							$('#id_ends').val(recipient);
						//	alert(""+recipient);

						
					});
			
		});

		
</script>
</head>

<body>

	<%
		///allow access only if session exists
	    
		String[] id = (String[]) session.getAttribute("user");
	    
		UsuarioCliente userCliente = null;
		UsuarioComerciante userComerciante = null;

		UsuarioComercianteDao dao = new UsuarioComercianteDao();
		if (id != null) {
			
			if (id[1].equals("1")) {


			} else {

		   userComerciante = dao.validaAutenticacaoUser(
		Long.parseLong(id[0]), Integer.parseInt(id[1]));
			}
		}
		String userName = null;
		String sessionID = null;
		
		if (userComerciante != null) {
			Pagina pagina = new Pagina();
			PaginaDao paginaDao= new PaginaDao();
			//out.println(userComerciante.getIdPagina());
			pagina = paginaDao.getPagina(userComerciante.getIdPagina());
			
			if(pagina != null){
		  //  pagina = new PaginaDao().getPagina(userComerciante.getIdPagina());
	%>
	<div id="wrapper">

		<!-- Navigation -->
		<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target=".navbar-ex1-collapse">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="">Painel Administrativo</a>
		</div>
		<!-- Top Menu Items -->
		<ul class="nav navbar-right top-nav">

			<!--  if for logado -->
			<%
				//if(userComerciante != null){
			%>
			<li class="dropdown"><a class="dropdown-toggle" role="button"
				data-toggle="dropdown" href="#"> <i
					class="glyphicon glyphicon-user"></i> <%=userComerciante.getLogin()%>
					<span class="caret"></span></a>
				<ul id="g-account-menu" class="dropdown-menu" role="menu">
					<li><a href="#">Meu Perfil</a></li>
					<li><a href="/plataforma_marketing/LogoutServlet"><i class="glyphicon glyphicon-lock"></i>
							Sair</a></li>
				</ul></li>
			<%
				//}
			%>



		</ul>
		<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
		<div class="collapse navbar-collapse navbar-ex1-collapse">
			<ul class="nav navbar-nav side-nav">
				<li class="co"><a href="/plataforma_marketing"><img
						src="/plataforma_marketing/img/logo.png"></img> </a></li>

				<li class=""><a href="admin_loja.jsp"><i
						class="fa fa-fw fa-file"></i> Configurações Pagina</a></li>

				<li><a href="javascript:;" data-toggle="collapse"
					data-target="#demo"><i class="fa fa-fw fa-arrows-v"></i>
						Produto<i class="fa fa-fw fa-caret-down"></i></a>

					<ul id="demo" class="collapse">
						<li><a href="cadastrar_produto.jsp"><i
								class="glyphicon glyphicon-plus"></i> Cadastrar Produto</a></li>

						<li><a href="editar_produto.jsp"><i
								class="glyphicon glyphicon-cog"></i> Editar Produto</a></li>

					</ul></li>
				<li><a href="config_admin.jsp"><i class="fa fa-fw fa-edit"></i>
						Configurações Admin</a></li>
						
							<li id="ir"><a href="/plataforma_marketing/<%=pagina.getPagina()%>"><i class="glyphicon glyphicon-transfer"></i>
					  Ir para Pagina</a></li>
						



			</ul>
		</div>
		<!-- /.navbar-collapse --> </nav>

		<div id="page-wrapper">

			<div class="container-fluid">

				<!-- Page Heading -->
				<div class="row">

					<%
						if(!request.getMethod().equals("POST")) {
					%>
					<div class="panel panel-default">
						<div class="panel-heading">
							<div class="panel-title">
								<i class="glyphicon glyphicon-wrench pull-right"></i>
								<h4>Configurações de Pagina</h4>
							</div>
						</div>
						<div class="panel-body">
					
							<!--  upload capa pagina -->
							
							
				 			<h3>Capa da Pagina</h3>
				 			<br/>
				 			
				 			<%if(!pagina.getImgPagina().equals("")){ %>
                            <div id="imgPrevia">
                             
                              <img id="capa" alt="" width="400" height="200" src="/plataforma_marketing/img/<%=pagina.getImgPagina()%>"/>
                            
                            </div>                  
       
                         <%}%>
                                     
                               <hr/>
                              
                               
                            
                            
                            
                                <!--  upload capa pagina -->
							<form class="form form-horizontal" method="post" action="upload"
								enctype="multipart/form-data">
								<input type="hidden" name="idPagina"
									value="<%=userComerciante.getIdPagina()%>" /> <span
									class="btn btn-default btn-file"> <input type="file"
									name="file" size="60">


								</span>
								
									<label></label>
									

										<button type="submit" class="btn btn-primary">Enviar Capa
										</button>
								
								


							</form>

							<!--  upload capa pagina -->

							<%
								//=userComerciante.getIdPagina()
							%>
							<%
								String p = request.getParameter("check-upload");
							       
							         if(p!= null)
							            out.print("Upload Realizado com sucesso");
							%>
							<h3>Endereço Loja</h3>
							<hr />
							<!--  Configuracoes de pagina -->


							<!--  tabela endereço  -->


							<div class="table-responsive">


								<table id="mytable" class="table table-bordred table-striped">

									<thead>

										<th><input type="checkbox" id="checkall" /></th>
										<th>Cep</th>										
										<th>Cidade</th>
										<th>Bairro</th>
										<th>Telefone</th>
										<th>Editar</th>
										<th>Deletar</th>
									</thead>
									<tbody>

										<%
											for(Endereco end :pagina.getEnds(Integer.parseInt(""+pagina.getId_pagina()))){
										%>
										<tr>
											<td><input type="checkbox" class="checkthis" /></td>
											
											<td><%=end.getCep()%></td>
											<td><%=end.getCidade()%></td>
											<td><%=end.getBairro()%></td>
											<td><%=end.getTelefone()%></td>
											<%=end.getId_end()%>
											 <td><p><button class="btn btn-primary btn-xs" data-title="EditEnd" data-toggle="modal" data-target="#EditEnd" data-placement="button" id="btnedit" data-whatever="<%=end.getId_end()%>" rel="tooltip"><span class="glyphicon glyphicon-pencil"></span> Editar</button></p></td>
											<!-- <td><a class='btn btn-info btn-xs' data-toggle="modal"
												data-placement="button" data-whatever=""
												data-target="#EditEnd" id="p">Editar </a>-->
											<td><p>
											<button class="btn btn-danger btn-xs" data-title="Delete"
														data-toggle="modal" data-target="#delete"
														data-placement="button" data-whatever="<%=end.getId_end()%>"  rel="tooltip">
														<span class="glyphicon glyphicon-trash"></span> Remover
													</button>
												</p></td>
										</tr>

										<%
										
											}
										%>




									</tbody>

								</table>

							</div>




							<!--  editar enderco -->
							<!-- Modal -->
							<div class="modal fade" id="EditEnd" tabindex="1000"
								role="dialog" aria-labelledby="" aria-hidden="">
								<div class="modal-dialog">
									<div class="modal-content">
										<form id="validEdit" class="form-horizontal" action="editar_end"
											method="post">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal">
													<span aria-hidden="true">&times;</span><span
														class="sr-only">Close</span>
												</button>
												<h4 class="modal-title" id="myModalLabel">Editar
													Endereço</h4>
											</div>
											<div class="modal-body">



												<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="login_empresa">Cep
													</label>
													<div class="col-md-5">
														<input name="cep" id="cep" type="text"
															class="form-control input-md">
													</div>
												</div>

												<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="login_empresa">Cidade
													</label>
													<div class="col-md-5">
														<input id="cidade" name="cidade" type="text"
															placeholder="" class="form-control input-md">

													</div>
												</div>

												<!-- Password input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="senha_empresa">Bairro</label>
													<div class="col-md-5">
														<input id="bairro" name="bairro" type="text"
															placeholder="" class="form-control input-md">

													</div>
												</div>



												<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="nome_empresa">Numero</label>
													<div class="col-md-5">
														<input id="numero" name="numero" type="text" 
															placeholder="" class="form-control input-md"
															>

													</div>
												</div>
												
													<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="nome_empresa">Rua</label>
													<div class="col-md-5">
														<input id="rua" name="rua" type="text"
															placeholder="" class="form-control input-md"
															>

													</div>
												</div>
												
														<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="nome_empresa">Telefone</label>
													<div class="col-md-5">
														<input id="telefone" name="telefone" type="text"
															placeholder="" class="form-control input-md"
															>

													</div>
												</div>
												

												<input type="hidden" id="count" name="count"/>
												<input type="hidden" id="id_pagina" name="id_pagina" />
												<input type="hidden" id="id_end" name="id_end"/>

												</fieldset>


											</div>

											<div class="modal-footer">
												<button type="button" class="btn btn-default"
													data-dismiss="modal">Close</button>
												<button type="submit" class="btn btn-primary">Save
													changes</button>
											</div>
										</form>
									</div>
								</div>
							</div>



							<!-- / editar endereco -->


							<!--  remover end -->

<div class="modal fade" id="delete" tabindex="1" role="dialog" aria-labelledby="edit" aria-hidden="true">
      <div class="modal-dialog">
    <div class="modal-content">
    

          <div class="modal-header">
               <form action="remover_end" method="POST">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title custom_align" id="Heading">Remover endereço</h4>
      </div>
          <div class="modal-body">
       
       <div class="alert alert-warning"><span class="glyphicon glyphicon-warning-sign"></span> Vocẽ realmente deseja remover o endereço ?</div>
       <input type="hidden" id="id_ends" name="id_end"/>
      </div>
        <div class="modal-footer ">
        <button type="submit" class="btn btn-success" ><span class="glyphicon glyphicon-ok-sign"></span> Yes</button>
        <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> No</button>
      </div>
         </form>
        </div>
   
    <!-- /.modal-content --> 
  </div>
      <!-- /.modal-dialog --> 
    </div>

							<!--  /remover end -->



							<!--/  tabela endereço  -->



							<!-- Button trigger modal -->
							<button type="button" class="btn btn-primary "
								data-toggle="modal" data-target="#myModal">Adicionar
								Endereço</button>

							<hr />
							<!-- -><div class="row clearfix">
								<div class="col-md-4 column">
									<table class="table table-bordered table-hover" id="tab_logic">
										<thead>
											<tr>
												<th class="text-center">#</th>
												<th class="text-center">Telefone</th>
												<th>Editar</th>
												<th>Deletar</th>

											</tr>
										</thead>
										<tbody>
											<tr id='addr0'>
												<td>1</td>
												<td><input type="text" name='name0'
													placeholder='Telefone' class="form-control" /></td>
												<td class="text-center"><a class='btn btn-info btn-xs'
													href="#"><span class="glyphicon glyphicon-edit"></span>
														Edit</a></td>
												<td><a href="#" class="btn btn-danger btn-xs"><span
														class="glyphicon glyphicon-remove"></span> Del</a></td>


											</tr>
											<tr id='addr1'></tr>
										</tbody>
									</table>
								</div>
							</div>
							<a id="add_row" class="btn btn-default pull-left">Add
								Telefone</a><a id='delete_row' class="pull-right btn btn-default">Delete
								Row</a> <br />
							<br /> -->
							<!-- Button -->
				



							<!--  /configura;oes de pagina -->




							<!-- Modal -->
							<div class="modal fade" id="myModal" tabindex="1000"
								role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
								<div class="modal-dialog">
									<div class="modal-content">
										<form id="valid_cad_end" class="form-horizontal"  action="cad_endereco"
											method="post">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal">
													<span aria-hidden="true">&times;</span><span
														class="sr-only">Close</span>
												</button>
												<h4 class="modal-title" id="myModalLabel">Cadastrar
													Endereço</h4>
											</div>
											<div class="modal-body">


														<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="login_empresa">Cep
													</label>
													<div class="col-md-5">
														<input name="cep" id="cep" type="text"
															class="form-control input-md">
													</div>
												</div>

												<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="login_empresa">Cidade
													</label>
													<div class="col-md-5">
														<input id="cidade" name="cidade" type="text"
															placeholder="" class="form-control input-md">

													</div>
												</div>

												<!-- Password input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="senha_empresa">Bairro</label>
													<div class="col-md-5">
														<input id="bairro" name="bairro" type="text"
															placeholder="" class="form-control input-md">

													</div>
												</div>



												<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="nome_empresa">Numero</label>
													<div class="col-md-5">
														<input id="numero" name="numero" type="text"
															placeholder="" class="form-control input-md"
															>

													</div>
												</div>
												
													<!-- Text input-->
												<div class="form-group">
													<label class="col-md-2 control-label" for="nome_empresa">Rua</label>
													<div class="col-md-5">
														<input id="rua" name="rua" type="text"
															placeholder="" class="form-control input-md"
															>

													</div>
												</div>
												
													<div class="form-group">
													<label class="col-md-2 control-label" for="nome_empresa">Telefone</label>
													<div class="col-md-5">
														<input id="telefone" name="telefone" type="text"
															placeholder="" class="form-control input-md"
															>

													</div>
												</div>

												<input type="hidden" id="count" name="count"/>
												<input type="hidden" id="id_pagina" name="id_pagina" value="<%=userComerciante.getIdPagina()%>"/>
												<input type="hidden" id="id_end" name="id_end"/>

												</fieldset>

											</div>

											<div class="modal-footer">
												<button type="button" class="btn btn-default"
													data-dismiss="modal">Close</button>
												<button type="submit" class="btn btn-primary">Save
													changes</button>
											</div>
										</form>
									</div>
								</div>
							</div>



						</div>
						<!--/panel content-->

					</div>
					<!--/panel-->
					<%
						}
					%>



				</div>
				<!--/panel content-->
			</div>
			<!--/panel-->

			<div class="panel panel-default">
				<div class="panel-heading">
					<div class="panel-title">
						<i class=""></i>
						<h4>Informações</h4>
					</div>
				</div>
				<div class="panel-body">



					<div class="modal-body">

						<table class="pull-left col-md-8 ">
							<tbody>
								<tr>
									<td class="h4"><strong>Código</strong></td>
									<td></td>
									<td class="h4"><%=userComerciante.getId()%></td>
								</tr>

								<tr>
									<td class="h4"><strong>Usuario</strong></td>
									<td></td>
									<td class="h4"><%=userComerciante.getLogin()%></td>
								</tr>

								
								<tr>
									<td class="h4"><strong>CNPJ</strong></td>
									<td></td>
									<td class="h4"><%=userComerciante.getCnpj()%></td>
								</tr>

								<tr>
									<td class="h4"><strong>QTD. Cumpons</strong></td>
									<td></td>
									<td class="h4"><%=userComerciante.getQtd_cupons()%></td>
								</tr>



							</tbody>
						</table>



						<div class="clearfix"></div>
						<p class="open_info hide">Lorem ipsum dolor sit amet,
							consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
							labore et dolore magna aliqua. Ut enim ad minim veniam, quis
							nostrud exercitation ullamco laboris nisi ut aliquip ex ea
							commodo consequat. Duis aute irure dolor in reprehenderit in
							voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
					</div>

					<div class="modal-footer"></div>

				</div>
				<!--/panel content-->
			</div>
			<!--/panel-->

		</div>
		<!-- /.row -->



	</div>
	<!-- /.container-fluid -->

	</div>
	<!-- /#page-wrapper -->

	</div>
	<!-- /#wrapper -->

	<!-- jQuery Version 1.11.0 -->




	<script src="../bootstrap/js/jquery-1.11.0.js"></script>
	<script src="../bootstrap/js/bootstrap.js"></script>

<script type="text/javascript" src="../bootstrap/js/bootstrapValidator.js"></script>


<script>

	 $(document).ready(function() {
			//$('#p').click(function() {				

					
					  $('#valid_cad_end').bootstrapValidator({
					        feedbackIcons: {
					            valid: 'glyphicon glyphicon-ok',
					            invalid: 'glyphicon glyphicon-remove',
					            validating: 'glyphicon glyphicon-refresh'
					        },
					        fields: {
					            numero: {
					                validators: {
					                    integer: {
					                        message: 'The value is not an integer'
					                        	
					                    }
					                }
					            },
					            telefone: {
									validators:{
										notEmpty:{
											message: 'Você deve digitar o número de telefone'
											},
											integer:{
												message: 'o telefone deve consistir apenas de números'
												},
												stringLength: {
							                        min: 8,
							                        max: 13,
							                        message: 'O telefone deve ter mais de 6 e menos de 13 numeros'
										}}
						            }
					        }
					    });		

					  $('#validEdit').bootstrapValidator({
					        feedbackIcons: {
					            valid: 'glyphicon glyphicon-ok',
					            invalid: 'glyphicon glyphicon-remove',
					            validating: 'glyphicon glyphicon-refresh'
					        },
					        fields: {
					            numero: {
					                validators: {
					                    integer: {
					                        message: 'The value is not an integer'
					                        	
					                    }
					                }
					            },
					            telefone: {
									validators:{
										notEmpty:{
											message: 'Você deve digitar o número de telefone'
											},
											integer:{
												message: 'o telefone deve consistir apenas de números'
												},
												stringLength: {
							                        min: 8,
							                        max: 13,
							                        message: 'O telefone deve ter mais de 6 e menos de 13 numeros'
										}}
						            }
				            
					        }
					    });

						
						
						
				
			
		});
    


	</script>



	<!-- Morris Charts JavaScript -->


	<%
		}}
	%>
	
	
	
	
</body>

</html>